(convert-standard-filename dir))
string))))))
-(defun dos-truncate-to-8+3 (filename)
+(defun dos-8+3-filename (filename)
"Truncate FILENAME to DOS 8+3 limits."
(if (or (not (stringp filename))
(< (length filename) 5)) ; too short to give any trouble
(let ((flen (length filename)))
;; If FILENAME has a trailing slash, remove it and recurse.
(if (memq (aref filename (1- flen)) '(?/ ?\\))
- (concat (dos-truncate-to-8+3 (substring filename 0 (1- flen)))
+ (concat (dos-8+3-filename (substring filename 0 (1- flen)))
"/")
(let* (;; ange-ftp gets in the way for names like "/foo:bar".
;; We need to inhibit all magic file names, because
(aset string (1- (length string)) lastchar))
(concat (if (and (stringp dir)
(memq (aref dir dlen-m-1) '(?/ ?\\)))
- (concat (dos-truncate-to-8+3 (substring dir 0 dlen-m-1))
+ (concat (dos-8+3-filename (substring dir 0 dlen-m-1))
"/")
;; Recurse to truncate the leading directories.
- (dos-truncate-to-8+3 dir))
+ (dos-8+3-filename dir))
string))))))
;; See dos-vars.el for defcustom.
;; Give DOS users a chance...
(and (fboundp 'msdos-long-file-names)
(not (msdos-long-file-names))
- (string-match (dos-truncate-to-8+3 (nth 2 (car tail)))
+ (string-match (dos-8+3-filename (nth 2 (car tail)))
filename)))
(setq slot (car tail)
name (car slot)